<template>
  <div @click.stop="">
    <el-dropdown :hide-on-click="isHideOnClick" :disabled="disabled" trigger="click" placement="bottom" class="flex">
      <el-image :src="operateBtns" class="img el-dropdown-link"/>
      <el-dropdown-menu slot="dropdown" class="mobile-menu">
        <slot/>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>
<script>
import operateBtns from '@/assets/mobileIcon/operateBtns.png';
export default {
  props: {
    isHideOnClick: {
      type: Boolean,
      default: true
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      operateBtns
    };
  }
};
</script>

<style lang="scss" scoped>
  .img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .mobile-menu {
    &::v-deep {
      .el-dropdown-menu__item {
        width: auto !important;
        max-width: 160px;
        font-size: 14px !important;
        text-align: center;
      }
    }
  }
  .flex {
    display: flex;
    justify-content: center;
  }
</style>
